home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / • Obsolete⁄Unsupported / ScriptX / Code Samples / autofind / source / loadme.sx < prev    next >
Encoding:
Text File  |  1996-05-21  |  2.8 KB  |  110 lines  |  [TEXT/ttxt]

  1. --<<<-
  2. -- Filename: 
  3. --     loadme.sx
  4.  
  5. -- Other Files Required:
  6. --     All those specified in a fileIn.
  7.  
  8. -- Purpose:  
  9. --     Compile and execute the AutoFinder title from scripts.
  10.  
  11. -- Specialized Classes:  
  12. --     None
  13.  
  14. -- Instructions to User:
  15. --     File this in the execute the title from scripts. Note that the menu bar will not be
  16. --     hidden when running from scripts, so that the menu can be accessed when debugging.
  17.  
  18. -- Author:
  19. --     Steve Mayer
  20.  
  21. fileIn theScriptDir name:"interfac.sx"  --Builds the accessory interface module
  22.  
  23. -- This will not open the interfac.sxl library if the above fileIn worked.
  24. -- I'm only using the fileIn because there is no guarantee that the interfac.sxl
  25. -- file will have been built by the same version of ScriptX.  In a stable
  26. -- build environment, the above fileIn should be removed, and the code below
  27. -- left in place.
  28. if ((getModule @AccessoryInterface) = false) do
  29.    (
  30.    open LibraryContainer dir:(parentDir theScriptDir) \
  31.                          path:"interfac.sxl"
  32.    )
  33.  
  34. module Autofinder
  35.    uses ScriptX
  36.    uses AccessoryInterface
  37. end
  38.  
  39. in module Autofinder
  40. global BuildOnly 
  41. BuildOnly := true
  42.  
  43. -- Load in the printing module
  44. if (not isdefined Printer) do (process (new loader) "loadable/printing")
  45. -- Should verify a printer exists!
  46. --enableitem thetitlecontainer.systemmenubar @print
  47.  
  48. fileIn theScriptDir name:"button.sx"
  49. fileIn theScriptDir name:"navbutn.sx"
  50.  
  51. -- For Main Menu
  52. fileIn theScriptDir name:"switch.sx"
  53. fileIn theScriptDir name:"menutogl.sx"
  54. fileIn theScriptDir name:"criteria.sx"
  55. fileIn theScriptDir name:"mainmenu.sx"
  56.  
  57. -- For Graph
  58. filein theScriptDir name:"grapher.sx"
  59. filein theScriptDir name:"axis.sx"
  60. filein theScriptDir name:"grphclab.sx"
  61. filein theScriptDir name:"grphmenu.sx"
  62. filein theScriptDir name:"axisprop.sx"
  63. filein theScriptDir name:"traveler.sx"
  64. filein theScriptDir name:"graphble.sx"
  65. filein theScriptDir name:"modelcar.sx"
  66. filein theScriptDir name:"autogrph.sx"
  67.  
  68. -- For Map
  69. fileIn theScriptDir name:"mapdoc.sx"
  70. fileIn theScriptDir name:"mapwin.sx"
  71. fileIn theScriptDir name:"mapper.sx"
  72.  
  73. -- For Classifieds
  74. filein theScriptDir name:"adobject.sx"
  75. filein theScriptDir name:"adlayout.sx"
  76. filein theScriptDir name:"ads.sx"
  77.  
  78. -- Autofinder main script
  79. fileIn theScriptDir name:"autofind.sx"
  80.  
  81. (
  82.     local titleContainerFilename:= "autofind.sxt"
  83.     if (not BuildOnly) do
  84.         titleContainerFilename:= "test.sxt"
  85.     local tc := new AutoFinderTitle \
  86.         dir:(parentDir theScriptDir) \
  87.         name: "Autofinder" \
  88.         path:titleContainerFilename
  89.     
  90.     tc.startUpAction := 
  91.     (tc ->
  92.         (
  93.             -- Load in the printing module
  94.             if (not isdefined Printer) do (process (new loader) "loadable/printing")
  95.     
  96.             -- Create the main window, load all of the classes and start the title.
  97.             createStage tc
  98.             start tc
  99.         )
  100.     )
  101.     append tc (getModule @Autofinder)
  102.     if (BuildOnly) then        
  103.         close tc
  104.     else
  105.         tc.startUpAction tc
  106. )
  107.  
  108. "Compiled loadme.sx"
  109. -->>>
  110.